#all:test so liblogger.a
all:liblogger.a so 

test:test.cpp logger.cpp datetime.cpp 
	g++ -g -o test test.cpp logger.cpp datetime.cpp
	rm -f *.o
	
so:logger.cpp datetime.cpp
	g++ -g -shared -o liblogger.so datetime.cpp logger.cpp -lpthread -fPIC

liblogger.a:logger.cpp datetime.cpp
	g++ -g -c logger.cpp -fPIC
	g++ -g -c datetime.cpp -fPIC
	ar rv liblogger.a logger.o datetime.o
	ranlib liblogger.a

install:
	cp liblogger.so ../../lib/
	cp logger.h ../../include/

clean:
	rm -f liblogger.so liblogger.a
	rm -f *.o
